<div data-role="header" data-nobackbtn="true">
	<h1 style="margin: 0.6em 1.2em 0.8em;">Webmail Polytech' Nice-Sophia</h1>
</div><!-- /header -->

<div data-role="content" data-theme="c">
	
	<?php if(isset($_SESSION['errors']['global'])): ?>
	<div class="error">
		<?php echo $_SESSION['errors']['global']; ?>
	</div><br />
	<?php endif; ?>
	
	<form method="post" action="<?php echo WEB_ROOT ?>member/login">

		<div data-role="fieldcontain">
			<fieldset data-role="controlgroup">
				<label id="labelUsername" for="login[username]"></label>
				<input type="text"
					name="login[username]" id="login[username]" value="<?php if(isset($_SESSION['form'])) echo $_SESSION['form']['username']; ?>"
					placeholder="Identifiant" />
			</fieldset>
			<fieldset data-role="controlgroup">
				<label id="labelPassword" for="login[password]"></label>
				<input type="password" name="login[password]"
					id="login[password]"
					value="<?php if(isset($_SESSION['form'])) echo $_SESSION['form']['password']; ?>"
					placeholder="Mot de passe" />
			</fieldset>
			<fieldset data-role="controlgroup">
				<input type="checkbox" name="login[remember]" id="login[remember]" />
				<label for="login[remember]">Connexion automatique</label>
			</fieldset>
		
		  <input type="submit" value="Connexion" />
		</div>
		
	</form>

</div><!-- /content -->


<script type="text/javascript">
$(document).ready(function() {
	jQuery.extend(jQuery.mobile,{
		ajaxFormsEnabled : false
	});
});
</script>


<script type="text/javascript">
if ( !supports_input_placeholder () )
{
	var e = document.getElementById ( "labelUsername" );
	if ( e != null )
	{
		e.innerHTML = "Identifiant :<br/>";
	}
	var e = document.getElementById ( "labelPassword" );
	if ( e != null )
	{
		e.innerHTML = "Mot de passe :<br/>";
	}
}
</script>

